package com.coderman.basketball.infrast.dao.dataobject;

import lombok.Getter;
import lombok.Setter;
import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;

/**
 * Description:
 * date: 2021/5/18
 *
 * @author shenshuai
 * @version 1.0.0
 * @since JDK 1.8
 */
@Getter
@Setter
public class BaseDO {
    private Date createTime;
    private Date updateTime;
    /**
     * 初始化时间
     */
    public void initDate() {
        Date now = new Date();
        createTime = now;
        updateTime = now;
    }


    @Override
    public String toString() {
        return ReflectionToStringBuilder.toString(this, ToStringStyle.DEFAULT_STYLE);
    }
}
